﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SheZhiJH.aspx.cs" Inherits="Web.Pages.YongShui.SheZhiJH" Theme="Default" ValidateRequest="false" %>
<%@ Register Assembly="DevExpress.Web.v15.2, Version=15.2.9.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" Namespace="DevExpress.Web" TagPrefix="dx" %>
<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>弹出框</title>
    <script src="../../../../JS/jquery.js" type="text/javascript"></script>
    <script src="../../../../JS/AddEditCancel.js" type="text/javascript"></script>
    <script type="text/javascript">
       
        $(function () {
            var arr = [txtM1, txtM2, txtM3, txtM4, txtM5, txtM6, txtM7, txtM8, txtM9, txtM10, txtM11, txtM12];
            GetSum(arr, txtMSum);
        })

        function txtMChange(s)
        {
            GetInt(s);
            if(cbBLF.GetChecked())
            {                
                s.SetText(s.GetText()*100);
            }
            var arr = [txtM1, txtM2, txtM3, txtM4, txtM5, txtM6, txtM7, txtM8, txtM9, txtM10, txtM11, txtM12 ];
            GetSum(arr, txtMSum);
        }

        function AllSame()
        {
            var arr = [txtM1, txtM2, txtM3, txtM4, txtM5, txtM6, txtM7, txtM8, txtM9, txtM10, txtM11, txtM12];
            SetSame(arr);
            GetSum(arr, txtMSum);
        }

        //保存
        function Save() {
            ASPxCallback1.PerformCallback("save");
        }

        function ASPxCallback1Complete(rs) {
            var arr = rs.split('|');
            var type = arr[0];
            var state = arr[1];
            var specialIdentity = arr[2];
            var msg = arr[3].split('-');
            if (msg[0] == 'True') {
                alert(msg[1]);
            }
            //debugger;
            hdCollection.Set("type", type);
            if (state == 'True') {
                if (type == "save") {
                    window.close();
                }
               
            }
        }
        
    </script>
    <style type="text/css">
        table {        
            line-height:30px
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
        <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
        <div class="tabletitle1" align="center">
            设置计划
        </div>
        <dx:ASPxHiddenField ID="ASPxHiddenField1" ClientInstanceName="hdCollection" runat="server"></dx:ASPxHiddenField>
        <dx:ASPxCallback ID="ASPxCallback1" ClientInstanceName="ASPxCallback1" runat="server" OnCallback="ASPxCallback1_Callback" ClientSideEvents-CallbackComplete="function(s,e){ASPxCallback1Complete(e.result);}"></dx:ASPxCallback>
        <dx:ASPxLoadingPanel ID="ASPxLoadingPanel1" ClientInstanceName="LoadPanel" runat="server" ContainerElementID="gvYongHuXX"></dx:ASPxLoadingPanel>
       
            <asp:UpdatePanel ID="UpdatePanel1" runat="server">
            <ContentTemplate>
                    <div id="GridViewContentTable" runat="server" style="width:99%">
                        <br />
                        <table style="width: 100%;">
                            <tr style="height: 25px">
                                <td colspan="2" style="width: 10%; text-align: right">用户号：</td>
                                <td style="width: 8%" align="left">
                                    <dx:ASPxTextBox ID="txtYongHuH" Width="90%" runat="server" Enabled="false">
                                    </dx:ASPxTextBox>
                                </td>
                                <td></td>
                                <td colspan="2" style="width: 10%; text-align: right">用户名：</td>
                                <td colspan="2" style="width: 20%" align="left">
                                    <dx:ASPxTextBox ID="txtYongHuM" Width="80%" runat="server" Enabled="false">
                                    </dx:ASPxTextBox>
                                </td>
                            </tr>
                            <tr style="height: 25px">
                                <td colspan="2" style="width: 10%; text-align: right">局号：</td>
                                <td style="width: 8%" align="left">
                                    <dx:ASPxTextBox ID="txtJuHao" Width="90%" runat="server" Enabled="false">
                                    </dx:ASPxTextBox>
                                </td>
                                <td style="width: 20%" align="left">
                                    <dx:ASPxTextBox ID="txtJuHao2" runat="server" Enabled="false">
                                    </dx:ASPxTextBox>
                                </td>
                                <td colspan="2" style="width: 10%; text-align: right">公司号：</td>
                                <td style="width: 8%" align="left">
                                    <dx:ASPxTextBox ID="txtGongSiM" Width="90%" runat="server" Enabled="false">
                                    </dx:ASPxTextBox>
                                </td>
                                <td style="width: 20%" align="left">
                                    <dx:ASPxTextBox ID="txtGongSiM2"  runat="server" Enabled="false">
                                    </dx:ASPxTextBox>
                                </td>
                            </tr>
                        </table>
                        <table id="yuefen" style="width: 99%; border: 1px solid #5aa0a3;margin:auto;">
                            <tr>
                                <td colspan="8"></td>
                            </tr>
                            <tr>
                                <td style="width: 5%; text-align: right;">1月：</td>
                                <td style="width: 20%; text-align: right;">
                                    <dx:ASPxTextBox ID="txtM1" runat="server" HorizontalAlign="Right" Width="60%" MaxLength="8" ClientInstanceName="txtM1">
                                    <ClientSideEvents KeyPress="function(s,e){OnKeyNext(txtM2);}" GotFocus="function(s,e){SetFocusC(s);}" TextChanged="function(s,e){txtMChange(s);}"/>
                                    </dx:ASPxTextBox>
                                </td>
                                <td style="width: 5%; text-align: right;">4月：</td>
                                <td style="width: 20%; text-align: right;">
                                    <dx:ASPxTextBox ID="txtM4" runat="server" HorizontalAlign="Right" Width="60%" MaxLength="8" ClientInstanceName="txtM4">
                                    <ClientSideEvents KeyPress="function(s,e){OnKeyNext(txtM5);}" GotFocus="function(s,e){SetFocusC(s);}" TextChanged="function(s,e){txtMChange(s);}"/>
                                    </dx:ASPxTextBox>
                                </td>
                                <td style="width: 5%; text-align: right;">7月：</td>
                                <td style="width: 20%; text-align: right;">
                                    <dx:ASPxTextBox ID="txtM7" runat="server" HorizontalAlign="Right" Width="60%" MaxLength="8" ClientInstanceName="txtM7">
                                    <ClientSideEvents KeyPress="function(s,e){OnKeyNext(txtM8);}" GotFocus="function(s,e){SetFocusC(s);}"  TextChanged="function(s,e){txtMChange(s);}"/>
                                    </dx:ASPxTextBox>
                                </td>
                                <td style="width: 5%; text-align: right">10月：</td>
                                <td style="width: 20%; text-align: right;">
                                    <dx:ASPxTextBox ID="txtM10" runat="server" HorizontalAlign="Right" Width="60%" MaxLength="8" ClientInstanceName="txtM10">
                                    <ClientSideEvents KeyPress="function(s,e){OnKeyNext(txtM11);}" GotFocus="function(s,e){SetFocusC(s);}"  TextChanged="function(s,e){txtMChange(s);}"/>
                                    </dx:ASPxTextBox>
                                </td>
                            </tr>
                            <tr>
                                <td style="width: 5%; text-align: right">2月：</td>
                                <td style="width: 20%; text-align: right;">
                                    <dx:ASPxTextBox ID="txtM2" runat="server" HorizontalAlign="Right" Width="60%" MaxLength="8"  ClientInstanceName="txtM2">
                                    <ClientSideEvents KeyPress="function(s,e){OnKeyNext(txtM3);}" GotFocus="function(s,e){SetFocusC(s);}" TextChanged="function(s,e){txtMChange(s);}"/>
                                    </dx:ASPxTextBox>
                                </td>
                                <td style="width: 5%; text-align: right">5月：</td>
                                <td style="width: 20%; text-align: right;">
                                    <dx:ASPxTextBox ID="txtM5" runat="server" HorizontalAlign="Right" Width="60%" MaxLength="8" ClientInstanceName="txtM5">
                                    <ClientSideEvents KeyPress="function(s,e){OnKeyNext(txtM6);}" GotFocus="function(s,e){SetFocusC(s);}" TextChanged="function(s,e){txtMChange(s);}"/>
                                    </dx:ASPxTextBox>
                                </td>
                                <td style="width: 5%; text-align: right">8月：</td>
                                <td style="width: 20%; text-align: right;">
                                    <dx:ASPxTextBox ID="txtM8" runat="server" HorizontalAlign="Right" Width="60%" MaxLength="8" ClientInstanceName="txtM8">
                                    <ClientSideEvents KeyPress="function(s,e){OnKeyNext(txtM9);}" GotFocus="function(s,e){SetFocusC(s);}"  TextChanged="function(s,e){txtMChange(s);}"/>
                                    </dx:ASPxTextBox>
                                </td>
                                <td style="width: 5%; text-align: right">11月：</td>
                                <td style="width: 20%; text-align: right;">
                                    <dx:ASPxTextBox ID="txtM11" runat="server" HorizontalAlign="Right" Width="60%" MaxLength="8" ClientInstanceName="txtM11" >
                                    <ClientSideEvents KeyPress="function(s,e){OnKeyNext(txtM12);}" GotFocus="function(s,e){SetFocusC(s);}"  TextChanged="function(s,e){txtMChange(s);}" />
                                    </dx:ASPxTextBox>
                                </td>
                            </tr>
                            <tr>
                                <td style="width: 5%; text-align: right">3月：</td>
                                <td style="width: 20%; text-align: right;">
                                    <dx:ASPxTextBox ID="txtM3" runat="server" HorizontalAlign="Right" Width="60%" MaxLength="8" ClientInstanceName="txtM3">
                                    <ClientSideEvents KeyPress="function(s,e){OnKeyNext(txtM4);}" GotFocus="function(s,e){SetFocusC(s);}" TextChanged="function(s,e){txtMChange(s);}"/>
                                    </dx:ASPxTextBox>
                                </td>
                                <td style="width: 5%; text-align: right">6月：</td>
                                <td style="width: 20%; text-align: right;">
                                    <dx:ASPxTextBox ID="txtM6" runat="server" HorizontalAlign="Right" Width="60%" MaxLength="8" ClientInstanceName="txtM6">
                                    <ClientSideEvents KeyPress="function(s,e){OnKeyNext(txtM7);}" GotFocus="function(s,e){SetFocusC(s);}" TextChanged="function(s,e){txtMChange(s);}"/>
                                    </dx:ASPxTextBox>
                                </td>
                                <td style="width: 5%; text-align: right">9月：</td>
                                <td style="width: 20%; text-align: right;">
                                    <dx:ASPxTextBox ID="txtM9" runat="server" HorizontalAlign="Right" Width="60%" MaxLength="8" ClientInstanceName="txtM9">
                                    <ClientSideEvents KeyPress="function(s,e){OnKeyNext(txtM10);}" GotFocus="function(s,e){SetFocusC(s);}" TextChanged="function(s,e){txtMChange(s);}"/>
                                    </dx:ASPxTextBox>
                                </td>
                                <td style="width: 5%; text-align: right">12月：</td>
                                <td style="width: 20%; text-align: right;">
                                    <dx:ASPxTextBox ID="txtM12" runat="server" HorizontalAlign="Right" Width="60%" MaxLength="8" ClientInstanceName="txtM12">
                                    <ClientSideEvents KeyPress="function(s,e){OnKeyNext(btnSave);}" GotFocus="function(s,e){SetFocusC(s);}" TextChanged="function(s,e){txtMChange(s);}"/>
                                    </dx:ASPxTextBox>
                                </td>
                            </tr>
                            <tr>
                                <td colspan="8"></td>
                            </tr>
                        </table>
                        <div style="width: 100%; height: 20px;">
                            <div style="float: left; width: 400px;">
                                <table style="width:100%">
                                    <tr>
                                        <td style="width:1%;white-space:nowrap;">
                                            <dx:ASPxCheckBox Checked="true" ID="cbBLF" runat="server" Text="百立方米输入" Width="80%" ClientInstanceName="cbBLF">
                                </dx:ASPxCheckBox>
                                        </td>
                                        <td style="padding-left:3px;">
                                        <%--<dx:ASPxButton ID="ASPxButton2" ClientInstanceName="btnAllSame" runat="server" Text="全年相同" AutoPostBack="false" UseSubmitBehavior="false">
                                            <ClientSideEvents Click="function(s,e){AllSame();}" />
                                        </dx:ASPxButton>--%>
                                    </td>
                                    </tr>
                                </table>
                                
                            </div>
                            <div style="float: right; width: 200px;">
                                <table>
                                    <tr>
                                        <td style=""><span>全年：</span></td>
                                        <td>
                                            <dx:ASPxTextBox Font-Bold="true" ID="txtMSum" ClientEnabled="false" runat="server" MaxLength="10" HorizontalAlign="Right" Width="80%" ClientInstanceName="txtMSum">
                                            </dx:ASPxTextBox>
                                        </td>
                                    </tr>
                                </table>
                            </div>
                        </div>
                        <table id="GridViewButtonTable" runat="server" style="width: 100%">
                            <tr>
                                <td style="text-align: right;">
                                    <hr />
                                    <dx:ASPxButton ID="btnSave" ClientInstanceName="btnSave" runat="server"  Text="保存" ClientSideEvents-Click="function(s,e){Save();}" UseSubmitBehavior="false" AutoPostBack="false">
                                       
                                    </dx:ASPxButton>
                                </td>
                            </tr>
                        </table>
             </div>
            </ContentTemplate>
        </asp:UpdatePanel>
        
    </form>
</body>
</html>
